#如果登录成功，输出欢迎信息，退出程序
#如果错误次数3次，退出程序
#用while
count = 0#定义一个计数器
while count < 3:
    username = input('please enter your username:')
    passwd = input('please enter your password:')
    if username.strip() == '':
        print('username is not null...')
    elif username == 'jack' and passwd == '123456':
        print('welcome,%s'%username)
        break
    else:
        print('username or password error...')
    count+=1
else:
    print('失败次数过多，请稍后再试！')
